This adds an example user for device_model_stubdomain_seclabel.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
- isolated_domU_t can only communicate with dom0
- prot_domU_t is a domain type whose creation can be disabled with a boolean
+HVM domains with stubdomain device models use two types (one per domain):
+ - domHVM_t is an HVM domain that uses a stubdomain device model
+ - dm_dom_t is the device model for a domain with type domHVM_t
+
One disadvantage of using type enforcement to enforce isolation is that a new
type is needed for each group of domains. In addition, it is not possible to
allow isolated_domU_t cannot to create loopback event channels without allowing
allow $1 $2:shadow enable;
allow $1 $2:mmu {map_read map_write adjust memorymap physmap pinpage};
allow $1 $2:grant setup;
- allow $1 $2:hvm { cacheattr getparam hvmctl irqlevel pciroute setparam };
+ allow $1 $2:hvm { cacheattr getparam hvmctl irqlevel pciroute setparam pcilevel trackdirtyvram };
allow $1 $2_$1_channel:event create;
')
getaddrsize pause unpause trigger shutdown destroy
setvcpuaffinity setdomainmaxmem };
')
+
################################################################################
#
# Inter-domain communication
allow $1 $1:grant { map_read map_write copy unmap };
')
+# device_model(dm_dom, hvm_dom)
+# Define how a device model domain interacts with its target
+define(`device_model', `
+ domain_comms($1, $2)
+ allow $1 $2:domain { set_target shutdown };
+ allow $1 $2:mmu { map_read map_write adjust physmap };
+ allow $1 $2:hvm { getparam setparam trackdirtyvram hvmctl irqlevel pciroute };
+')
################################################################################
#
# Device types and delegation (PCI passthrough)
domain_comms(dom0_t, prot_domU_t)
domain_comms(domU_t, prot_domU_t)
+# domHVM_t is meant to be paired with a qemu-dm stub domain of type dm_dom_t
+declare_domain(domHVM_t)
+create_domain(dom0_t, domHVM_t)
+manage_domain(dom0_t, domHVM_t)
+domain_comms(dom0_t, domHVM_t)
+domain_self_comms(domHVM_t)
+
+declare_domain(dm_dom_t)
+create_domain(dom0_t, dm_dom_t)
+manage_domain(dom0_t, dm_dom_t)
+domain_comms(dom0_t, dm_dom_t)
+device_model(dm_dom_t, domHVM_t)
+
###############################################################################
#
# Device delegation